#!/bin/bash
#
make distclean >/dev/null
rm -rf lipo_temp
rm -rf release
mkdir -p lipo_temp &&
mkdir -p release/Checker &&
mkdir -p release/Xchecklist/64 &&
make distclean >/dev/null
qmake -spec macx-clang-32 && make &&
cp plugin/libmac.xpl.dylib lipo_temp/mac32.xpl &&
cp checker/checker lipo_temp/mac_checker_32bit &&
cp simon/simon_mac lipo_temp/simon_mac32
if [ $? != 0 ] ; then
  exit
fi



make distclean >/dev/null
qmake -spec macx-clang && make &&
cp plugin/libmac.xpl.dylib lipo_temp/mac64.xpl &&
cp checker/checker lipo_temp/mac_checker_64bit &&
cp simon/simon_mac lipo_temp/simon_mac64
if [ $? != 0 ] ; then
  exit
fi

lipo -create lipo_temp/mac_checker_32bit lipo_temp/mac_checker_64bit -output release/Checker/mac_checker

lipo -create lipo_temp/mac32.xpl lipo_temp/mac64.xpl -output release/Xchecklist/mac.xpl

lipo -create lipo_temp/simon_mac32 lipo_temp/simon_mac64 -output release/Xchecklist/simon_mac

#

